Integrand size = 26, antiderivative size = 108 \[ \int (-\sec (e+f x))^n (a-a \sec (e+f x))^{3/2} \, dx=\frac {2 a^2 (1+4 n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-n,\frac {3}{2},1+\sec (e+f x)\right ) \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}+\frac {2 a^2 (-\sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}} \]
[Out]
Time = 0.19 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3899, 21, 3891, 67} \[ \int (-\sec (e+f x))^n (a-a \sec (e+f x))^{3/2} \, dx=\frac {2 a^2 (4 n+1) \tan (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-n,\frac {3}{2},\sec (e+f x)+1\right )}{f (2 n+1) \sqrt {a-a \sec (e+f x)}}+\frac {2 a^2 \tan (e+f x) (-\sec (e+f x))^n}{f (2 n+1) \sqrt {a-a \sec (e+f x)}} \]
[In]
[Out]
Rule 21
Rule 67
Rule 3891
Rule 3899
Rubi steps \begin{align*} \text {integral}& = \frac {2 a^2 (-\sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}-\frac {(2 a) \int \frac {(-\sec (e+f x))^n \left (-a \left (\frac {1}{2}+2 n\right )+a \left (\frac {1}{2}+2 n\right ) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)}} \, dx}{1+2 n} \\ & = \frac {2 a^2 (-\sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}+\frac {(a (1+4 n)) \int (-\sec (e+f x))^n \sqrt {a-a \sec (e+f x)} \, dx}{1+2 n} \\ & = \frac {2 a^2 (-\sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}+\frac {\left (a^3 (1+4 n) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(-x)^{-1+n}}{\sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{f (1+2 n) \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {2 a^2 (1+4 n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1-n,\frac {3}{2},1+\sec (e+f x)\right ) \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}}+\frac {2 a^2 (-\sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a-a \sec (e+f x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 3.32 (sec) , antiderivative size = 316, normalized size of antiderivative = 2.93 \[ \int (-\sec (e+f x))^n (a-a \sec (e+f x))^{3/2} \, dx=\frac {2^{-\frac {3}{2}+n} e^{-\frac {1}{2} i (e+f x)} \left (\frac {e^{i (e+f x)}}{1+e^{2 i (e+f x)}}\right )^{\frac {1}{2}+n} \left (1+e^{2 i (e+f x)}\right )^{\frac {1}{2}+n} \csc ^3\left (\frac {1}{2} (e+f x)\right ) \left (-\frac {\operatorname {Hypergeometric2F1}\left (\frac {n}{2},\frac {3}{2}+n,\frac {2+n}{2},-e^{2 i (e+f x)}\right )}{n}+\frac {3 e^{i (e+f x)} \operatorname {Hypergeometric2F1}\left (\frac {1+n}{2},\frac {3}{2}+n,\frac {3+n}{2},-e^{2 i (e+f x)}\right )}{1+n}-\frac {3 e^{2 i (e+f x)} \operatorname {Hypergeometric2F1}\left (\frac {3}{2}+n,\frac {2+n}{2},\frac {4+n}{2},-e^{2 i (e+f x)}\right )}{2+n}+\frac {e^{3 i (e+f x)} \operatorname {Hypergeometric2F1}\left (\frac {3}{2}+n,\frac {3+n}{2},\frac {5+n}{2},-e^{2 i (e+f x)}\right )}{3+n}\right ) (-\sec (e+f x))^n \sec ^{-\frac {3}{2}-n}(e+f x) (a-a \sec (e+f x))^{3/2}}{f} \]
[In]
[Out]
\[\int \left (-\sec \left (f x +e \right )\right )^{n} \left (a -a \sec \left (f x +e \right )\right )^{\frac {3}{2}}d x\]
[In]
[Out]
\[ \int (-\sec (e+f x))^n (a-a \sec (e+f x))^{3/2} \, dx=\int { {\left (-a \sec \left (f x + e\right ) + a\right )}^{\frac {3}{2}} \left (-\sec \left (f x + e\right )\right )^{n} \,d x } \]
[In]
[Out]
\[ \int (-\sec (e+f x))^n (a-a \sec (e+f x))^{3/2} \, dx=\int \left (- \sec {\left (e + f x \right )}\right )^{n} \left (- a \left (\sec {\left (e + f x \right )} - 1\right )\right )^{\frac {3}{2}}\, dx \]
[In]
[Out]
\[ \int (-\sec (e+f x))^n (a-a \sec (e+f x))^{3/2} \, dx=\int { {\left (-a \sec \left (f x + e\right ) + a\right )}^{\frac {3}{2}} \left (-\sec \left (f x + e\right )\right )^{n} \,d x } \]
[In]
[Out]
\[ \int (-\sec (e+f x))^n (a-a \sec (e+f x))^{3/2} \, dx=\int { {\left (-a \sec \left (f x + e\right ) + a\right )}^{\frac {3}{2}} \left (-\sec \left (f x + e\right )\right )^{n} \,d x } \]
[In]
[Out]
Timed out. \[ \int (-\sec (e+f x))^n (a-a \sec (e+f x))^{3/2} \, dx=\int {\left (a-\frac {a}{\cos \left (e+f\,x\right )}\right )}^{3/2}\,{\left (-\frac {1}{\cos \left (e+f\,x\right )}\right )}^n \,d x \]
[In]
[Out]